﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace YasharEl.Infrastructure.EntityModel
{
    [Serializable]
    public class DateTimeConvertException : DomainModelException
    {
        public DateTimeConvertException(string acceptedValue, string usedFormat)
            : base(string.Format("Could not convert accepted DateTime value : {0} when format used : {1}", acceptedValue, usedFormat))
        {

        }

        public DateTimeConvertException(string acceptedValue, string usedFormat, Exception innerException)
            : base(string.Format("Could not convert accepted DateTime value : {0} when format used : {1}", acceptedValue, usedFormat), innerException)
        {

        }

        protected DateTimeConvertException(SerializationInfo info, StreamingContext context) :
            base(info, context)
        {
        }
    }
}
